package com.system.controller;//package com.system.controller;
//
//import com.system.model.SysUser;
//import com.system.service.SysUserService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//
//@Controller
//public class LoginController2 {
//
//    @Autowired
//    private SysUserService sysUserService;
//
//    @RequestMapping("/login")
//    public String login(HttpServletRequest request, HttpServletResponse response, HttpSession session, Model model, SysUser sysUser){
//        SysUser sysUser_db=sysUserService.querySysUserByUsername(sysUser);
//        if(sysUser_db!=null){
//            if(sysUser.getUsername().equals(sysUser_db.getUsername())){
//                if (sysUser.getPassword().equals(sysUser_db.getPassword())) {
//                    session.setAttribute("sysUserName", sysUser_db.getName());
//                    //model.addAttribute("message", "登陆成功！");
//                    return "view/frame/index";
//                }else{
//                    //model.addAttribute("message","密码错误！！");
//                    return "login";
//                }
//            }
//        }
//       // model.addAttribute("message","不存在该用户！！");
//        return "login";
//    }
//}
